home *** CD-ROM | disk | FTP | other *** search
- /* $Revision Header built automatically *************** (do not edit) ************
- **
- ** © Copyright by Binary Dreams
- **
- ** File : viewer.rexx
- ** Created on : Thursday, 10.11.94 00:55:28
- ** Created by : Fabrizio Lodi
- ** Current revision : V1.0
- **
- **
- ** Purpose
- ** -------
- ** Make actions on filetype.
- ** Identify the filetype on extension.
- **
- ** Revision V1.0
- ** --------------
- ** created on Saturday, 10.12.94 08:48:34 by Fabrizio Lodi. LogMessage :
- ** - Now I wanna know if someone like the idea
- **
- ** Revision V0.2
- ** --------------
- ** created on Saturday, 10.12.94 08:46:29 by Fabrizio Lodi. LogMessage :
- ** - Some comment :-) added
- ** Now is more simply to understand
- **
- ** Revision V0.1
- ** --------------
- ** created on Thursday, 10.11.94 00:55:28 by Fabrizio Lodi. LogMessage :
- ** --- Initial release ---
- **
- *********************************************************************************/
-
- /*
- Here we get the file name from the command line
- */
- arg filename
-
- /*
- An then we extract the file extension, ie the chars after the last '.'
- */
- ext=''
- if lastpos(".",filename)~==0 then ext=right(filename,length(filename)-lastpos(".",filename),lastpos(".",filename))
-
- /*
- Finally we run the needed command line for an extension or a single file
- */
- select
- when filename=='READ.ME' then address command 'tr '||filename
- when ext=='DOC' then address command 'tr '||filename
- when ext=='TXT' then address command 'tr '||filename
- when ext=='IFF' then address command 'fastview '||filename
- when ext=='GIF' then address command 'fastview '||filename
- when ext=='PIC' then address command 'fastview '||filename
- when ext=='JPG' then address command 'fastjpeg '||filename
- when ext=='JPEG' then address command 'fastjpeg '||filename
- when ext=='INFO' then address command 'wbinfo '||filename
- when ext=='GUIDE' then address command 'multiview '||filename
- when ext=='LHA' then address command 'pk:lha l '||filename||' >con:0/0/500/200/LHA/CLOSE/WAIT'
- otherwise address command 'multiview '||filename
- end
-
-